1. Field of the Invention
The present invention relates to an information processing apparatus and method, and more particularly to an information processing apparatus and method, which can more appropriately execute input/output control of a buffer.
2. Description of the Related Art
Hitherto, MPEG-2 (Motion Picture Expert Group) and AVC (Advanced Video Codec) have been practiced as coding methods (called “codec”) for realizing a high compression rate based on inter-frame correlation, motion compensation, etc. Those codec techniques are suitable for use in recording data because of a high compression rate, but they generate a delay in units of several frames because the inter-frame correlation or the motion compensation is performed. On the other hand, JPEG (Joint Picture Expert Group), JPEG2000, etc. have been practiced as coding methods (codec) not employing correlation between frames. That type of codec is inferior in compression rate to MPEG-2 and AVC, but it has a feature capable of suppressing a delay to one frame because of a closed compression method within a frame. Accordingly, the latter codec is suitable for use in low-delay communication and is utilized in, e.g., a monitoring camera. Further, codec for compressing data on the line basis has been practiced as a technique providing a lower delay than JPEG and JPEG2000. The term “line-base codec” implies a codec technique of executing compression in units of several lines and outputting compressed data successively instead of executing compression in units of a full one frame.
In the line-base codec, because a compression parameter is determined based on information of several lines without using information of an entire screen, a variation in bit rate per processing unit is increased with respect to a target bit rate (i.e., a compression rate of an image stream). An output of the line-base codec is provided as a VBR (Variable Bit Rate), and when the output is sent via a communication line, the VBR is converted to a CBR (Constant Bit Rate). For that purpose, a code stream and incidental data (encoding parameters) are temporarily buffered in a latter stage of an encoder and are output in match with the situation of a transmission path (see, e.g., Japanese Unexamined Patent Application Publication No. 2008-28541).
In such a buffering process, however, if the situation of the transmission path is not good, outputting of data from the buffer is stopped and is not resumed until the situation of the transmission path returns to a good state. On the other hand, inputting of data to the buffer is continuously performed regardless of the situation of the transmission path. Accordingly, if the situation of the transmission path remains not good, the buffer becomes full of data (namely, a write pointer catches up with a read pointer from the behind), thus causing a bank-full state. In the bank-full state, since not-yet-read data is stored in all banks of the buffer, new data is not normally buffered.
A first conceivable solution to overcome the above-described problem is to, when new data is input in the bank-full state, discard the new data without storing the input data. A second conceivable solution is to, when next data is input in the bank-full state, make all the banks empty and store the supplied data in the emptied banks. A third conceivable solution is to increase the capacity (i.e., the number of banks) of the buffer so that a larger quantity of information can be buffered, thereby avoiding the occurrence of the bank-full state.